package com.navi.loaddata.core.oracleEntity;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * Created by fw_06 on 2018/1/16.
 */
public class MesProducthistoryPK implements Serializable {
    private String productname;
    private String timekey;

    @Column(name = "PRODUCTNAME")
    @Id
    public String getProductname() {
        return productname;
    }

    public void setProductname(String productname) {
        this.productname = productname;
    }

    @Column(name = "TIMEKEY")
    @Id
    public String getTimekey() {
        return timekey;
    }

    public void setTimekey(String timekey) {
        this.timekey = timekey;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MesProducthistoryPK that = (MesProducthistoryPK) o;

        if (productname != null ? !productname.equals(that.productname) : that.productname != null) return false;
        if (timekey != null ? !timekey.equals(that.timekey) : that.timekey != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = productname != null ? productname.hashCode() : 0;
        result = 31 * result + (timekey != null ? timekey.hashCode() : 0);
        return result;
    }
}
